// We must init the list when you using const or &

#include <iostream>
using namespace std;

class Human {
	public:
		Human( int n_age=0, const char* n_name="wuming", float n_score=0.0 )
			: age(n_age), name(n_name), score(n_score), len(name.size()) {
			// [ int age = age; ]
			// [ string name(name); ]
			// [ const float score; ]
			// [ int len = n_name.size() ]
			cout << "This function has been called" << endl;
		}
		Human( const Human& that )
			:age(that.age), name(that.name), score(that.score), len(that.len) {
			cout << "called" << endl;
			// [ int age = that.age ]
			// [ string name = that.name ]
		}
		void getinfo( ) {
			cout << "name : " << name << endl;
			cout << "age : " << age << endl;
			cout << "socre : " << score << endl;
		}
	private:
		int len;
		int age;
		string name;
		const float score;
};

// designer
// ------------------------------------------------------------------
// user

int main( void ) { 
	Human h( 22, "zhangei" );
	Human h3(h);
	
	h3.getinfo( );

	return 0;
}

